let obj = {
  name: "coderqian",
  hobby: {
    outdoor: "basketball",
    indoor: "watch mv",
  },
};
// function shallowclone(obj) {
//   let newobj = {};
//   for (let i in obj) {
//     newobj[i] = obj[i];
//   }
//   return newobj;
// }
// let newobj = shallowclone(obj);
// let newobj = {};
// Object.assign(newobj, obj);
newobj.name = "cod";
newobj.hobby.outdoor = "cc";
console.log(newobj);
console.log(obj);
